class Message {
    constructor (code, message = '', data = {}) {
        this.code = code
        this.message = message
        this.data = data
    }
    add_data (key, value) {
        this.data[key] = value
    }
    to_json () {
        return JSON.stringify(this.data)
    }
}